package com.chance.cc.crawler.development.command.schedule.baidu;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.baidu.realtime.BaiDuPostBarRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.baidu.realtime.BaiDuTieBaRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.baidu.trace.BaiDuPostBarTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.baidu.trace.BaiDuTieBaCommentTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.baidu.trace.BaiDuTieBaTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.schedule.CommonCrawlerJobTestScheduler;
import org.junit.Test;

/**
 * @author lt
 * @version 1.0
 * @date 2021-03-30 10:49:59
 * @email okprog@sina.com
 */
public class BaiDuTieBaCrawlerScheduler extends CommonCrawlerJobTestScheduler {
    public static void main(String[] args) {
        commonCrawlerScheduleJob(BaiDuTieBaRealtimeCrawlerSchedulerJob.crawlerScheduler());
        commonCrawlerScheduleJob(BaiDuTieBaTraceCrawlerSchedulerJob.crawlerScheduler());
        commonCrawlerScheduleJob(BaiDuTieBaCommentTraceCrawlerSchedulerJob.crawlerScheduler());
//        commonCrawlerScheduleJob(BaiDuPostBarRealtimeCrawlerSchedulerJob.crawlerScheduler());
//        commonCrawlerScheduleJob(BaiDuPostBarTraceCrawlerSchedulerJob.crawlerScheduler());
    }

    public static void commonCrawlerScheduleJob(CrawlerJob crawlerJob){
        crawlerJobScheduleCommand_15.republishCrawlerJob(crawlerJob.generateCrawlerTriggerKey(),device_name_15);
    }

    public static void  commonDelCrawlerScheduleJob(CrawlerJob crawlerJob){
        crawlerJobScheduleCommand_15.deleteCrawlerJob(crawlerJob.generateCrawlerTriggerKey(),device_name_15);
    }

    @Test
    public void delCrawlerJob(){
        commonDelCrawlerScheduleJob(BaiDuTieBaCommentTraceCrawlerSchedulerJob.crawlerScheduler());
    }
}
